package w2.onespace.service.serviceImp;
import bean.UserAddress;
import com.alibaba.dubbo.config.annotation.Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import w2.onespace.service.UserService;
import java.util.ArrayList;
import java.util.List;
/**
 * @Classname UserServiceImp
 * @Description TODO
 * @Date 2022/3/25 14:59
 * @Created by chenjin
 */
@Component
@Service(timeout = 5000)
@Slf4j
public class UserServiceImp implements UserService {
    @Override
    public List<UserAddress> getUserAddressList(String userId) {
        System.out.println("UserServiceImpl.....old...");
        log.info("服务者提供者");
        // TODO Auto-generated method stub
        UserAddress userAddress1 = new UserAddress(1, "A", 2, "陈晋", "111", "on");
        UserAddress userAddress2 = new UserAddress(2, "B", 3, "李莉", "2222", "on");
        log.info("address1"+userAddress1);
        log.info("address2"+userAddress2);
        ArrayList<UserAddress> userAddresses = new ArrayList();
        userAddresses.add(userAddress1);
        userAddresses.add(userAddress2);
        for (UserAddress userAddress : userAddresses) {
            log.info("提供者"+userAddress);
        }
        return userAddresses;
    }
    @Override
    public void deleteeById() {
        log.info("根据用户id删除");
    }
}
